// 测试模版引擎（/index和/about）页面Handlebars

const express = require('express');
const hbs = express.Router();
const img = 'https://7072-prod-4gapv4gl33a8a0ff-1305990777.tcb.qcloud.la/%E9%87%8D%E8%A6%81%E5%9B%BE%E7%89%87%E5%AD%98%E5%82%A8/%E8%B1%8C%E8%B1%86%E5%9C%88%E5%AD%90%E5%B0%8F%E7%A8%8B%E5%BA%8F%E5%9B%BE%E7%89%87/2891704418680_.pic.jpg?sign=2f48aaf410e2c01ab12eb301f4885c82&t=1704780920'
hbs.get('/index', (req, res)=>{
        // 渲染index.hbs文件
        res.render('index',{
            name: '张三',
            message: 'Hello, World!',
            img,
        });
    }  
)
hbs.get('/about', (req,res)=>{
// 渲染about.hbs文件
    res.render('about');
})

module.exports = hbs;